#include "MyPluginDlg.h"
#include "ccGLWindow.h"



MyPluginDlg::MyPluginDlg(QWidget* parent) : QDialog(parent), Ui::MyPluginDlg()
{
    setupUi(this);

	
	connect(okButton,       SIGNAL(clicked()), this, SLOT(apply()));
	
    setWindowFlags(Qt::Tool/*Qt::Dialog | Qt::WindowStaysOnTopHint*/);
}

MyPluginDlg::~MyPluginDlg()
{

}

void MyPluginDlg::linkWith(ccGLWindow* win)
{
	if (m_associatedWin == win)
		return;

	
	m_associatedWin = win;
	
	//assert(m_toTransform);
	//assert(m_toTransform->getChildrenNumber()==0);
	//m_toTransform->setDisplay(win);
}

bool MyPluginDlg::start()
{
	if (!m_associatedWin)   
        return false;

	m_associatedWin->setUnclosable(true);
	m_associatedWin->displayNewMessage("[Rotation/Translation mode]",3600);
	m_associatedWin->updateGL();

	show();
}

void MyPluginDlg::stop()
{

}

void MyPluginDlg::clear()
{

}

